-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix impersonate beam condition lower than 2.39.0 always evaluating true #33308
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
@VladaZakharova -> do you know of any reason where |
Maybe @mik-laj can let us know if there was something else there that did not make it into the final commit. |
@VladaZakharova your example is not using impersonate_service_account, so it does not enter into that condition: airflow/airflow/providers/apache/beam/hooks/beam.py Lines 274 to 279 in b5a4d36
|
Sorry, my bad :D |
Looks like left-over debugging :) |
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Impersonation of service accounts was added in Apache Beam 2.39.0. In PR #27263 validation was added to fix backwards compatibility, but there is an "or True" condition that causes to always evaluate to true. This is causing environment with Apache Beam 2.39.0 and higher to always raise the exception. Same condition was replicated in PR #31471 when support for deferrable mode was added.
Removing conflicting "or True" from code:
airflow/airflow/providers/apache/beam/hooks/beam.py
Line 276 in b5a4d36
airflow/airflow/providers/apache/beam/hooks/beam.py
Line 491 in b5a4d36
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.